package com.lsl.bridge;

/**
 * 这个类位于"类的功能层次结构"的最上层
 * <p>
 * DisplayImpl通过Display类的构造函数传递给Display类
 *
 * @author Zed
 * @description
 * @date 2022/11/28 20:16
 */
public class Display {
    private DisplayImpl displayImpl;

    public Display(DisplayImpl displayImpl) {
        this.displayImpl = displayImpl;
    }

    public void open() {
        displayImpl.rawOpen();
    }

    public void print() {
        displayImpl.rawPrint();
    }


    public void close() {
        displayImpl.rawClose();
    }

    public final void display() {
        open();
        print();
        close();
    }
}
